package com.cn.jx.manager.po;

import com.cn.jx.common.entity.BaseIdEntity;

import static com.jx.util.CodeUtil.getRandomId;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Entity
@Table(name="SYS_TASK")
public class Task extends BaseIdEntity {

	/** <p>TODO <p>{@link long serialVersionUID}*/
	private static final long serialVersionUID = -3979197619040933492L;

	@Column(name="title",length=100)
	private String title;
	
	@Column(name="content",length=800)
	private String content;
	
	@Temporal(TemporalType.TIMESTAMP)//任务创建时间
	@Column(name="create_time")
	private Date createTime;
	
	@Temporal(TemporalType.TIMESTAMP)//任务开始时间
	@Column(name="start_time")
	private Date startTime;
	
	@Temporal(TemporalType.TIMESTAMP)//任务结束时间
	@Column(name="end_time")
	private Date endTime;
	
	@Temporal(TemporalType.TIMESTAMP)//操作时间
	@Column(name="operat_time")
	private Date operatTime;
	
	@Column(name="create_user",length=64)
	private String createUser;
	
	//任务操作人
	@Column(name="operator",length=64)
	private String operator;
	
	@Column(name="task_status",length=64)
	private String taskStatus;

	public static Task getInstance(String operUser){
		Date day=new Date();
		Task m=new Task();
		m.setId(getRandomId());
		m.setCreateTime(day);
		m.setCreateUser(operUser);
		return m;
	}
	
	/** <p>{@link Date Date getStartTime()*/
	public Date getStartTime() {
		return startTime;
	}



	/** <p>setStartTime({@link Date Date startTime})*/
	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}



	/** <p>{@link Date Date getEndTime()*/
	public Date getEndTime() {
		return endTime;
	}



	/** <p>setEndTime({@link Date Date endTime})*/
	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}



	/** <p>{@link Date Date getOperatTime()*/
	public Date getOperatTime() {
		return operatTime;
	}



	/** <p>setOperatTime({@link Date Date operatTime})*/
	public void setOperatTime(Date operatTime) {
		this.operatTime = operatTime;
	}



	/** <p>{@link String String getOperator()*/
	public String getOperator() {
		return operator;
	}



	/** <p>setOperator({@link String String operator})*/
	public void setOperator(String operator) {
		this.operator = operator;
	}



	/** <p>{@link String String getTaskStatus()*/
	public String getTaskStatus() {
		return taskStatus;
	}



	/** <p>setTaskStatus({@link String String taskStatus})*/
	public void setTaskStatus(String taskStatus) {
		this.taskStatus = taskStatus;
	}



	/** <p>{@link String String getTitle()*/
	public String getTitle() {
		return title;
	}

	/** <p>setTitle({@link String String title})*/
	public void setTitle(String title) {
		this.title = title;
	}

	/** <p>{@link String String getContent()*/
	public String getContent() {
		return content;
	}

	/** <p>setContent({@link String String content})*/
	public void setContent(String content) {
		this.content = content;
	}

	/** <p>{@link Date Date getCreateTime()*/
	public Date getCreateTime() {
		return createTime;
	}

	/** <p>setCreateTime({@link Date Date createTime})*/
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	/** <p>{@link String String getCreateUser()*/
	public String getCreateUser() {
		return createUser;
	}

	/** <p>setCreateUser({@link String String createUser})*/
	public void setCreateUser(String createUser) {
		this.createUser = createUser;
	}


}
